const express = require('express')
const parse = require('body-parser')
const cors = require('cors')
const app = express()
// 配置表单数据的中间件
app.use(parse.urlencoded({ extends: false }))
// 配置跨域
app.use(cors())
// 导入和使用router
const router = require('./apiRouter')
app.use('/api', router)

app.listen('80', () => {
  console.log('Server is running at http://127.0.0.1')
})
